﻿using System;

namespace BSPortal.Usercontrol
{
    public partial class CategoryMenu : System.Web.UI.UserControl
    {
        public short CategoryId;
        private MainService service =new MainService();
        protected void Page_Load(object sender, EventArgs e)
        {
            Category category = service.GetCategoryById(CategoryId);
            header.InnerText = category.Name;
            var listCategory = service.GetListChildCategoryByParent(CategoryId).FindAll(row=>(bool)row.IsPublished == true);
            categoryRepeater.DataSource = listCategory;
            categoryRepeater.DataBind();
        }
    }
}